package com.ezia.coreservices.charging;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

import com.ezia.coreservices.charging.filter.HTTPBearerAuthorizeAttribute;


@SpringBootApplication
public class EziacoreservicesChargingApplication {

	public static void main(String[] args) {
		SpringApplication.run(EziacoreservicesChargingApplication.class, args);
	}
	
	@Bean  
    public FilterRegistrationBean jwtFilterRegistrationBean(){  
        FilterRegistrationBean registrationBean = new FilterRegistrationBean();  
        HTTPBearerAuthorizeAttribute httpBearerFilter = new HTTPBearerAuthorizeAttribute();  
        registrationBean.setFilter(httpBearerFilter);  
        List<String> urlPatterns = new ArrayList<String>();  
        urlPatterns.add("/test/*");
        registrationBean.setUrlPatterns(urlPatterns);  
        return registrationBean;  
    }
}
